package com.cg.controller;


import com.cg.dto.AddWorkDTO;
import com.cg.dto.AddWorkTypeDTO;
import com.cg.result.R;
import com.cg.service.IWorkTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 加
 * @since 2025-02-15
 */
@RestController
@CrossOrigin
@RequestMapping("/api/workType")
@Api(value = "workTypeController",description = "欢迎来到绣品类型管理",tags = "绣品类型管理")
public class WorkTypeController {
    @Autowired
    private IWorkTypeService workTypeService;
    @ApiOperation("新增绣品类型")
    @PostMapping("/addWorkType")
    public R addWorkType(AddWorkTypeDTO addWorkTypeDTO){
        return workTypeService.addWorkType(addWorkTypeDTO);
    }
}
